<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>使用for in 语句</title>
</head>
<body>
<script type="text/javascript">
    var myarray = new Array();
    myarray[0] = "星期一";
    myarray[1] = "星期二";
    myarray[2] = "星期三";
    myarray[3] = "星期四";
    myarray[4] = "星期五";
    myarray[5] = "星期六";
    myarray[6] = "星期日";
    for(var i in myarray) {
        document.write(myarray[i] + "<br/>");
    }

</script>

</body>
</html>